package com.example.umeng

import android.content.Intent
import android.os.Bundle
import android.view.View
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.blankj.utilcode.util.SPUtils
import com.umeng.commonsdk.UMConfigure

class PrivacyActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContentView(R.layout.activity_privacy)
        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
            val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
            insets
        }
    }

    fun yinsi(view: View) {
        //第一次打卡：正式初始化
        UMConfigure.init(this,"68498601bc47b67d8382f25c","channel", UMConfigure.DEVICE_TYPE_PHONE,null)
        SPUtils.getInstance().put("ad",true)
        startActivity(Intent(this,MainActivity::class.java))
    }
}